<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.Table1px {}{
  border-collapse:collapse;
  border: none;
  background: #FFFFFF;
  table-layout:fixed;
}
.Table1px th {}{
  border: solid 1px #000000;
}
.Table1px td {}{
  border: solid 1px #000000;
}
-->
</style>
<script language="javascript">
function toggle(source) {
  checkboxes = document.getElementsByName('arr_action[]');
  for(var i in checkboxes)
    checkboxes[i].checked = source.checked;
}
</script>
</head>
<body style="font-family:Arial, Helvetica, sans-serif; font-size:12px;">
<h1>Dispose Product List </h1>
1) Select Product:
<br />
<br/>
<form action="/faultyaudit/save-dispose-list" method="post">

<table width="800" border="1" cellspacing="0" cellpadding="5" class="Table1px">
  <tr>
    <td><input type="checkbox" onclick="toggle(this)" />
All / None</td>
    <td>ID</td>
    <td>Shop Code</td>
    <td>Barcode</td>
    <td style="width:200px;">Name</td>
    <td>Date of Audit</td>
    <td style="width:200px;">Qty</td>

  </tr>
<?php
$counts = 0;
foreach($this->disposeList as $k => $v){
?>  
  <tr>
      <td><input name="arr_action[]" type="checkbox" value="<?=$v["id_faulty"]?>"  checked="checked" /></td>
    <td>#<?=$v["id_faulty"]?></td>
    <td><?=$v["shopcode_faulty"]?></td>
    <td><?=$v["product_code_faulty"]?></td>
    <td><?=$v["product_name_faulty"]?></td>
    <td><?=$v["date_faulty"]?></td>
    <td>x <?=$v["faulty_qty"]?> Pcs
    <?php
    $counts += $v["faulty_qty"];
	?>
    </td>
  </tr>
<?php
}
?>
  <tr>
    <td><input type="checkbox" onClick="toggle(this)" />
    All / None</td>
    <td>ID</td>
    <td>Shop Code</td>
    <td>Barcode</td>
    <td style="width:200px;">Name</td>
    <td>Date of Audit</td>
    <td style="width:200px;">Qty</td>

  </tr>
</table>
<br />
<br/>
2) Count Total Quantity (Selected &amp; non-Selected)<br />
<br />
Total Amount of Dispose Product is :<?=$counts?><br />
<br />
3)Confirm and Print Summary
<br />
<br />
Auditor Name :
<input name="staff_name" type="text" id="staff_name" value="Yuki" />
<br />
<br />
<input name="go" type="submit" value="Confirm Take Action" id="go" />
</form>
</body>
</html>
